home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / atre27.exe / ATREE_27 / OCRDEMO2 / EDITSCRO.H < prev    next >
C/C++ Source or Header  |  1992-08-01  |  5KB  |  121 lines

  1. /*****************************************************************************
  2.  ****                                                                     ****
  3.  **** editscro.h                                                          ****
  4.  ****                                                                     ****
  5.  **** atree release 2.7 for Windows                                       ****
  6.  **** Adaptive Logic Network (ALN) simulation program.                    ****
  7.  **** Copyright (C) M. Thomas, N. Sanche, W.W. Armstrong 1991, 1992       ****
  8.  ****                                                               ****
  9.  **** License:                                                            ****
  10.  **** A royalty-free license is granted for the use of this software for  ****
  11.  **** NON_COMMERCIAL PURPOSES ONLY. The software may be copied and/or     ****
  12.  **** modified provided this notice appears in its entirety and unchanged ****
  13.  **** in all derived source programs.  Persons modifying the code are     ****
  14.  **** requested to state the date, the changes made and who made them     ****
  15.  **** in the modification history.                                        ****
  16.  ****                                                                     ****
  17.  **** Patent License:                                                     ****
  18.  **** The use of a digital circuit which transmits a signal indicating    ****
  19.  **** heuristic responsibility is protected by U. S. Patent 3,934,231     ****
  20.  **** and others assigned to Dendronic Decisions Limited of Edmonton,     ****
  21.  **** W. W. Armstrong, President.  A royalty-free license is granted      ****
  22.  **** by the company to use this patent for NON_COMMERCIAL PURPOSES to    ****
  23.  **** adapt logic trees using this program and its modifications.         ****
  24.  ****                                                                     ****
  25.  **** Limited Warranty:                                                   ****
  26.  **** This software is provided "as is" without warranty of any kind,     ****
  27.  **** either expressed or implied, including, but not limited to, the     ****
  28.  **** implied warrantees of merchantability and fitness for a particular  ****
  29.  **** purpose.  The entire risk as to the quality and performance of the  ****
  30.  **** program is with the user.  Neither the authors, nor the             ****
  31.  **** University of Alberta, its officers, agents, servants or employees  ****
  32.  **** shall be liable or responsible in any way for any damage to         ****
  33.  **** property or direct personal or consequential injury of any nature   ****
  34.  **** whatsoever that may be suffered or sustained by any licensee, user  ****
  35.  **** or any other party as a consequence of the use or disposition of    ****
  36.  **** this software.                                                      ****
  37.  **** Modification history:                                               ****
  38.  ****                                                                     ****
  39.  **** 92.04.27 atree v2.5 for Windows, M. Thomas                          ****
  40.  **** 92.03.07 Release 2.6, Monroe Thomas, Neal Sanche                    ****
  41.  **** 92.01.08 Release 2.7, Monroe Thomas, Neal Sanche                    ****
  42.  ****                                                                     ****
  43.  *****************************************************************************/
  44.  
  45. // Defines
  46.  
  47. #ifndef __EDITSCRO_H
  48. #define __EDITSCRO_H
  49.  
  50. #define OEMRESOURCE
  51.  
  52. #ifndef __OWL_H
  53. #include <owl.h>
  54. #endif
  55.  
  56. #ifndef __BUTTON_H
  57. #include <button.h>
  58. #endif
  59.  
  60. #ifndef __CONTROL_H
  61. #include <control.h>
  62. #endif
  63.  
  64. #ifndef __EDIT_H
  65. #include <edit.h>
  66. #endif
  67.  
  68. #undef OEMRESOURCE
  69.  
  70. #define ESN_CHANGE 0
  71.  
  72. _CLASSDEF(TESEdit)
  73. _CLASSDEF(TESButton)
  74. _CLASSDEF(TEditScroll)
  75.  
  76. class TESButton;
  77. class TESEdit;
  78.  
  79. class TEditScroll : public TControl
  80. {
  81. private:
  82.     PTESButton Up;
  83.     PTESButton Down;
  84.     PTESEdit Edit;
  85.  
  86.     int wStart;
  87.     int wEnd;
  88.     int wCurrent;
  89.     int wTextLen;
  90.  
  91. public:
  92.     virtual void Init(int AStart, int AnEnd, int AFirst,
  93.                                         int ATextLen, PTModule AModule);
  94.  
  95.     TEditScroll(PTWindowsObject AParent, int AnId,
  96.                 int AStart, int AnEnd, int AFirst,
  97.                 int X, int Y, int W, int H,
  98.                 int ATextLen, PTModule AModule = NULL)
  99.             : TControl(AParent, AnId, "", X, Y, W, H, AModule)
  100.         { Init(AStart, AnEnd, AFirst, ATextLen, AModule); }
  101.  
  102.     TEditScroll(PTWindowsObject AParent, int ResourceId,
  103.                             int AStart, int AnEnd, int AFirst,
  104.                             int ATextLen, PTModule AModule = NULL)
  105.             :    TControl(AParent, ResourceId, AModule)
  106.         { Init(AStart, AnEnd, AFirst, ATextLen, AModule); }
  107.  
  108.     virtual void SetupWindow();
  109.  
  110.     virtual void DefChildProc(RTMessage);
  111.     virtual int GetText(LPSTR, int);
  112.     virtual void SetText(LPSTR);
  113.     virtual LPSTR GetClassName() { return "EditScroll"; }
  114.     virtual void GetWindowClass(WNDCLASS&);
  115.     virtual void WMDrawItem(RTMessage) = [WM_FIRST + WM_DRAWITEM];
  116.     virtual void WMLButtonDown(RTMessage) = [WM_FIRST + WM_LBUTTONDOWN];
  117.     virtual void WMEnable(RTMessage) = [WM_FIRST + WM_ENABLE];
  118.     virtual void WMSetFocus(RTMessage) = [WM_FIRST + WM_SETFOCUS];
  119. };
  120.  
  121. #endif    // __EDITSCRO_H